package org.dtrd.modules.questionnaire.entity.bean;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.dtrd.modules.questionnaire.entity.po.DtrdEntRdQuestionnaireData;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author xiao
 * @since 2022-06-16
 */
@Getter
@Setter
@ApiModel(value = "详情")
public class QuestionnaireDataDetail {


    private Integer dataId;

    @ApiModelProperty(value = "问题id", required = true)
    private Integer questionId;

    @ApiModelProperty(value = "患者id", required = true)
    private Integer patientId;

    @ApiModelProperty(value = "答案", required = true)
    private String answer;

    @ApiModelProperty(value = "得分", required = true)
    private Float score;

    @ApiModelProperty(value = "问卷类型", required = true)
    private String questionType;


    public QuestionnaireDataDetail parseFromPo(DtrdEntRdQuestionnaireData po) {
        dataId = po.getDataId();
        questionId = po.getQuestionId();
        patientId = po.getPatientId();
        answer = po.getAnswer();
        score = po.getScore();
        questionType = po.getQuestionType();
        return this;
    }
}
